package cn.homework.service.impl;

import cn.homework.dao.FeedbackDao;
import cn.homework.dao.impl.FeedbackDaoImpl;
import cn.homework.domain.Idea;
import cn.homework.service.FeedbackService;

import java.util.List;
import java.util.Map;

/**
 * @author ACT
 */
public class FeedbackServiceImpl implements FeedbackService {
    private FeedbackDao dao = new FeedbackDaoImpl();
    @Override
    public List<Idea> findAllFeedback() {
        return dao.findAllFeedback();
    }

    @Override
    public void addPublishFeedback(String message, String name) {
        dao.addPublishFeedback(message, name);
    }

    @Override
    public void addReplyFeedback(String message, String name, String id) {
        dao.addReplyFeedback(message, name, id);
    }

    @Override
    public void delFeedback(String id) {
        dao.delFeedbackById(id);
    }

    @Override
    public Idea feedbackDetailById(String id) {
        return dao.feedbackDetailById(id);
    }

    @Override
    public List<Idea> findFeedbackByCondition(Map<String, String[]> map) {
        return dao.findFeedbackByCondition(map);
    }
}
